<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>流水管理—流水关联</title>
    <meta name="author" content="dc">
    <link rel="stylesheet" type="text/css" href="/css/materialdesignicons.min.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="/css/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/css/style.min.css">
    <link href="/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css"/>
    <!--固定table列-->
    <link href="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.min.css" rel="stylesheet"/>
    <!--时间选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css"/>
    <link rel="stylesheet" href="/css/input_tags.css" />
    <link rel="stylesheet" type="text/css" href="/css/daterangepicker.css" />
    <!--日期选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datepicker/bootstrap-datepicker3.min.css"/>
    <!-- 多选下拉 -->
    <link rel="stylesheet" href="/css/bootstrap-multiselect.css" type="text/css"/>
    <link rel="stylesheet" href="/css/bootstrap-select.css" type="text/css"/>
    <link rel="stylesheet" href="/css/skin.css"/>
    <link rel="stylesheet" href="/css/viewer.css">
    <link rel="stylesheet" href="/css/finance/serialQuery.css">
    <!--表单校验插件-->
    <link rel="stylesheet" href="/css/bootstrapValidator.min.css" />
</head>
<body>

<div class="container-fluid clue-page">
    <div class="card">
        <div class="card-header">
            <h1>
                <span>流水关联</span>
            </h1>

        </div>
        <div class="card-body clearFix">
            <form id="customerForm" style="margin-bottom:20px" >
                <div class="mainContainer">
                    <div class="paddNo contractTypeContainer clearFix">
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 form-group">
                            <label class="control-label">交易流水号：</label>
                            <span id="transactionNo"></span>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 form-group">
                            <label class="control-label">交易时间：</label>
                            <span id="transactionDate"></span>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 form-group">
                            <label class="control-label">收款账号：</label>
                            <span id="payeeAcount"></span>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 form-group">
                            <label class="control-label">对方单位名称：</label>
                            <span id="oppositeCompany"></span>
                        </div>

                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 form-group">
                            <label class="control-label">对方银行名称：</label>
                            <span id="oppositeBank"></span>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 form-group">
                            <label class="control-label">对方银行账号：</label>
                            <span id="oppositeBankAccount"></span>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 form-group">
                            <label class="control-label">贷款金额：</label>
                            <span id="creditMoney"></span>
                        </div>

                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 form-group">
                            <label class="control-label">当前已用关联金额：</label>
                            <span id="usedAmount"></span>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 form-group">
                            <label class="control-label">当前可用关联金额：</label>
                            <span id="availableAmount"></span>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 form-group">
                            <label class="control-label" style="vertical-align: top;">摘要：</label>
                            <textarea disabled rows="3" style="resize: none;width: calc(100% - 160px)" id="abstracts"></textarea>
                        </div>
                    </div>
                </div>
            </form>
            <form class="form-horizontal pull-left" id="relationForm">
                <div class="row form-group clearFix">
                    <label class="control-label label-required pull-left" id="orderNumberTitle">订单编号:</label>
                    <div class="form-content clearFix">
                        <div class="min-search pull-left">
                            <input class="form-control" type="text" placeholder="请输入订单编号"
                                   id="orderNumber" name="orderNumber">
                            <button class="btn btn-primary" type="button" style="height:36px" onclick="searchOrder()">
                                <i class="mdi mdi-magnify"></i><span>搜索</span>
                            </button>
                        </div>
                    </div>
                </div>
            </form>
            <form class="form-horizontal pull-left" id="relationPayForm">
                <div class="row form-group clearFix">
                    <label class="control-label label-required pull-left" id="payNumberTitle">客户充值码:</label>
                    <div class="form-content clearFix">
                        <div class="min-search pull-left">
                            <input class="form-control" type="text" placeholder="请输入充值码"
                                   id="payNumber" name="payNumber">
                            <button class="btn btn-primary" type="button" style="height:36px" onclick="searchPayNumber()">
                                <i class="mdi mdi-magnify"></i><span>搜索</span>
                            </button>
                        </div>
                    </div>
                </div>
            </form>
            <div class="pull-right" id="relationAll">
                <button class="btn btn-primary" id="allRelation" type="button" onclick="openReturnMoneyModal('all')">
                    <span>全部关联</span>
                </button>
            </div>
            <div id="orderInfo">
                <div class="orderModule" id="orderDetail">
                    <h4>
                        <span>订单详情</span>
                        <span id="orderNumberCon">
                            (订单编号:<span id="orderNumberText"></span>)
                        </span>
                    </h4>
                    <div class="orderDetailModule clearFix">
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 form-group">
                            <label class="control-label">订单创建时间：</label>
                            <p id="createTm" class="orderText"></p>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 form-group">
                            <label class="control-label">订单状态：</label>
                            <p id="orderStatus" class="orderText"></p>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 form-group">
                            <label class="control-label">订单所有人：</label>
                            <p id="createPeopleName" class="orderText"></p>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 form-group">
                            <label class="control-label">所属分公司：</label>
                            <p id="companyName" class="orderText"></p>
                        </div>

                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 form-group">
                            <label class="control-label">客户名称：</label>
                            <p id="customerName" class="orderText"></p>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 form-group">
                            <label class="control-label">合作开发人：</label>
                            <p>
                                <a href="#!" data-toggle="modal" data-target="#cooperateModal">查看</a>
                            </p>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 form-group">
                            <label class="control-label">合同编号：</label>
                            <p id="contractNumber" class="orderText"></p>
                        </div>

                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 form-group">
                            <label class="control-label">合同类型：</label>
                            <p id="contractType" class="orderText"></p>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 form-group">
                            <label class="control-label">合同起止时间：</label>
                            <p id="contractStartEndDate" class="orderText"></p>
                        </div>
                    </div>
                    <div class="orderDetailModule">
                        <div class="currentMonthMoneyContainer clearFix">
                            <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 pull-left clearFix moneyModule">
                                <div class="pull-left" style="width:30px;height:60px;margin-right:15px;display: flex;align-items: center;">
                                    <img src="../../../../images/finance/serialQuery/icon1.png" alt="">
                                </div>
                                <div class="pull-left" style="padding-top:5px">
                                    <p class="title">订单总金额</p>
                                    <p class="currentMonthMoney">
                                        <!--  <strong>￥</strong>-->
                                        <strong id="orderActualTotalAmount" class="orderNum"></strong>
                                    </p>
                                </div>

                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 pull-left clearFix moneyModule">
                                <div class="pull-left" style="width:30px;height:60px;margin-right:15px;display: flex;align-items: center;">
                                    <img src="../../../../images/finance/serialQuery/icon2.png" alt="">
                                </div>
                                <div class="pull-left" style="padding-top:5px">
                                    <p class="title">当前回款</p>
                                    <p class="currentMonthMoney">
                                        <!--  <strong>￥</strong>-->
                                        <strong id="returnMoneyAmount" class="orderNum"></strong>
                                    </p>
                                </div>

                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 pull-left clearFix">
                                <div class="pull-left" style="width:30px;height:60px;margin-right:15px;display: flex;align-items: center;">
                                    <img src="../../../../images/finance/serialQuery/icon3.png" alt="">
                                </div>
                                <div class="pull-left" style="padding-top:5px">
                                    <p class="title">当前尾款</p>
                                    <p class="currentMonthMoney">
                                        <!--  <strong>￥</strong>-->
                                        <strong id="residueMoneyAmount" class="orderNum"></strong>
                                        <span class="residueMoneyTip" id="residueMoneyAmountTip"></span>
                                    </p>
                                </div>

                            </div>

                        </div>
                    </div>
                </div>
                <div class="orderModule" id="productDetail">
                    <h4>
                        <span>产品明细</span>
                    </h4>
                    <div id="productDetailContainer">

                    </div>
                </div>
                <div class="orderModule" id="customerPayContainer">
<!--                    <div style="display:none" id="payNumberText"></div>-->
                    <h4>
                        <span>充值详情</span>
                        <span id="payNumberCon">
                            (充值码:<span id="payNumberText"></span>)
                        </span>
                    </h4>
                    <table id="customerPayTable"></table>
                </div>
                <div class="orderModule" id="productCollectionRecord">
                    <h4>
                        <span>产品回款记录</span>
                    </h4>
                    <table id="returnMoneyTable"></table>
                </div>
                <div class="orderModule" id="productReviseRecord">
                    <h4>
                        <span>产品修改记录</span>
                    </h4>
                    <table id="reviseRecordTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<!--全部回款/产品回款-->
<div class="modal fade bs-example-modal-lg modal-edit" tabindex="-1" role="dialog" id="returnMoneyModal">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 id="modalTitle">全部回款</h4>
            </div>
            <div class="modal-body">
                <form class="well" id="returnMoneyForm">
                    <div class="row">
                        <div class="clearFix">
                            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 col-pad form-group">
                                <label class="control-label label-required label-width" title="到款日期">到款日期</label>
                                <div class="form-content peers-display">
                                    <input type="text" class="form-control bottomInput" readonly id="arriveTime" name="arriveTime" autocomplete="off">

                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 col-pad form-group">
                                <label class="control-label label-required label-width" for="arriveMoney" title="到款金额">到款金额</label>
                                <div class="form-content peers-display">
                                    <input type="text" id="arriveMoney" name="arriveMoney" readonly class="form-control bottomInput"
                                           placeholder="请输入到款金额" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,4})?).*$/g, '$1')">
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 col-pad form-group">
                                <label class="control-label label-required label-width" title="付款单位">付款单位</label>
                                <div class="form-content peers-display">
                                    <input type="text" class="form-control bottomInput"  placeholder="请输入付款单位" id="paymentUnit" name="paymentUnit">
                                </div>
                            </div>
                        </div>
                        <div class="clearFix">
                            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 col-pad form-group">
                                <label class="control-label label-required label-width" title="到款方式">到款方式</label>
                                <div class="form-content peers-display">
                                    <input type="text" class="form-control bottomInput" id="arriveMethod" readonly  value="银行汇款" name="arriveMethod">
                                    <!-- <select class="form-control bottomInput" readonly="readonly" title="请选择" id="arriveMethod" name="arriveMethod" placeholder="请选择" >
                                         <option  value="0">银行汇款</option>
                                         <option  value="1">现金</option>
                                         <option  value="3">线上支付</option>
                                     </select>-->
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 col-pad form-group" id="paymentAccountDiv">
                                <label class="control-label label-width" title="付款账号">付款账号</label>
                                <div class="form-content peers-display">
                                    <input type="text" class="form-control bottomInput"  placeholder="请输入付款账号" id="paymentAccount" name="paymentAccount">
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 col-pad form-group" id="paymentBankDiv">
                                <label class="control-label label-width" title="付款银行">付款银行</label>
                                <div class="form-content peers-display">
                                    <input type="text" class="form-control bottomInput" placeholder="请输入付款银行" id="paymentBank" name="paymentBank">
                                </div>
                            </div>
                        </div>
                        <div class="clearFix">
                            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 col-pad form-group" id="serialDiv">
                                <label class="control-label label-width" title="付款账号">流水号</label>
                                <div class="form-content peers-display">
                                    <input type="text" class="form-control bottomInput" readonly placeholder="请输入流水号" id="serial" name="serial">
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 col-pad form-group">
                                <label class="control-label label-required label-width" title="到款账号类型">到款账号类型</label>
                                <div class="form-content peers-display">
                                    <select class="form-control bottomInput" title="请选择" id="arriveAccountType" name="arriveAccountType" placeholder="请选择">
                                        <option value="0" id="branchAccount">分公司账号</option>
                                        <option value="1">北京财税研究院</option>
                                        <option value="2">大成方略网络科技有限公司</option>
                                        <option value="3">北京大成方略财务顾问有限公司</option>
                                        <option value="4">北京大成方略纳税人俱乐部有限公司</option>
                                        <option value="5">大成方略纳税人俱乐部股份有限公司</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 col-pad form-group">
                            <label class="control-label " title="备注">备注</label>
                            <div class="form-content peers-display">
                                <textarea id="remark" name="remark" class="form-control" placeholder="请输入备注" rows="3"></textarea>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" id="relateAllBtn" onclick="submitRelation('all')">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>
<!-- 合作开发人员列表 -->
<div class="modal fade" tabindex="-1" role="dialog" id="cooperateModal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4>合作开发人员</h4>
            </div>
            <div class="modal-body" style="padding-bottom: 18px;">
                <table id="cooperateTable"></table>
            </div>
        </div>
    </div>
</div>
<!--明细-->
<div class="modal fade" tabindex="-1" role="dialog" id="exchangeDetailModal">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4>查看</h4>
            </div>
            <div class="modal-body" style="min-height: 200px;">
                <main id="exchangeApproval" class="clearFix">
                    <form class="form-horizontal clearFix" style="padding:0 20px;" id="exchangeDtails">

                    </form>
                </main>
            </div>
        </div>
    </div>
</div>
<!-- 预回款提示 -->
<div class="modal fade" tabindex="-1" role="dialog" id="advancePayment">
    <div class="modal-dialog" role="document" style="width:400px">
        <div class="modal-content">
            <div class="modal-header" style="border:none;padding-bottom:0">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
            </div>
            <div class="modal-body" style="padding-top: 0">
                <h3 style="font-size:16px;font-weight: 500;color:#556785" id="tipText">关联成功!</h3>
                <div class="content clearFix" id="warningTip">
                    <img class="pull-left" src="/images/finance/serialQuery/warnIcon.png" alt="">
                    <span class="tipContent pull-left">
                        当前流水的<strong>对方单位名称</strong>与<strong>关联订单的客户名称</strong>不一致,触发审核,<strong>当前回款为预回款!</strong>
                    </span>
                </div>
            </div>
            <div class="modal-footer" style="border:none;padding:10px 20px 30px 0">
                <button type="button" class="btn btn-primary" style="width:80px" data-dismiss="modal">确认</button>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="/js/popper.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script src="/js/crm/common/common.js"></script>
<!--表格-->
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min-1.18.3.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<!-- 拖动 -->
<script src="/js/bootstrap-table/extensions/resizable/bootstrap-table-resizable.min.js"></script>
<script src="/js/crm/common/colResizable-1.6.min.js"></script>
<!--时间选择插件-->
<script src="/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<!--日期选择插件-->
<script src="/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script src="/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<script type="text/javascript" src="/js/crm/common/dataRangePicker.min.js"></script>
<!-- 多选框下拉 -->
<script type="text/javascript" src="/js/bootstrap-multiselect.js"></script>
<script type="text/javascript" src="/js/bootstrap-select.js"></script>
<!--图片查看-->
<script type="text/javascript" src="/js/viewer.js"></script>
<script type="text/javascript" src="/js/jquery-viewer.js"></script>
<!--表单校验-->
<script type="text/javascript" src="/js/bootstrapValidator.min.js"></script>
<!--轮播图-->
<script type="text/javascript" src="/js/swiper-bundle.min.js"></script>
<!-- 评分插件 -->
<script type="text/javascript" src="/js/jquery.raty.js"></script>
<!-- 子页面公用js -->
<script src="/js/crm/common/pageCommon.js"></script>
<!---->
<script type="text/javascript" src="/js/crm/finance/serialRelate.js"></script>
</html>